package com.jin;

import javax.swing.JFrame;

public class ExamResult {

	public static StringBuffer bufferResult = new StringBuffer();

	public static int score = 0;

	private static int index = 1;

	public static JFrame curJframe;

	public static void setCurFrame(JFrame curJframe) {
		ExamResult.curJframe = curJframe;
	}
	
	public static void curFrameClose(JFrame curJframe) {
		ExamResult.curJframe.dispose();
	}

	public static void add(String str) {
		bufferResult.append(str).append("\n");
	}

	public static int getIndexAndIncrement() {
		int r = index;
		index++;
		return r;
	}

	public static int getIndex() {
		return index;
	}

	public static String info() {
		return bufferResult.toString();
	}

}
